﻿<UserControl x:Class="QplusClassLibrary.Views.ContactsItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:QplusClassLibrary.ViewModel"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Width="100" Height="90">
    <!--xmlns:lightToolkit="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP7"-->
    <UserControl.Resources>
        <vm:ContactsItemViewModel x:Key="ContactsItemViewModel"></vm:ContactsItemViewModel>
    </UserControl.Resources>
   
    <StackPanel Orientation="Horizontal" x:Name="LayoutRoot" Background="Transparent">
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="MouseLeftButtonDown">
                <!--<lightToolkit:EventToCommand 
                                Command="{Binding ShowMessageBoxCommand, Source={StaticResource ContactsItemViewModel}}"
                                CommandParameter="{Binding Path=Text, ElementName=NameField}"
                            ></lightToolkit:EventToCommand>-->
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <Image Width="90" Height="90" Source="/Images/Person.png" ></Image>
        <StackPanel Margin="12,0,12,0" Orientation="Vertical">
            <TextBlock x:Name="NameField" Text="{Binding Name, Mode=OneWay}" Margin="0,10,0,20"></TextBlock>
            <TextBlock Text="{Binding Tel, Mode=OneWay}"></TextBlock>
        </StackPanel>
    </StackPanel>
</UserControl>
